package com.hmkj.core.mapper.simulation;

import com.hmkj.common.baseMapper.GenericMapper;
import com.hmkj.core.model.simulation.SubscribeModel;
import com.hmkj.core.po.simulation.Subscribe;
import com.hmkj.core.po.sysNotice.SystemNotice;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;

/**
 * 高手相关Dao接口<br>
 *
 * @author eproo
 * @date 2018-07-06 10:24:25
 */
public interface SubscribeMapper extends GenericMapper<Subscribe, Integer> {
    @Select("SELECT t.*,b.user_name AS 'b.userName',b.mobile_phone AS 'b.mobilePhone' FROM biz_subscribe t LEFT JOIN  biz_user b on t.user_id=b.id WHERE 1=1 ${whereSql} ${sortSql} limit ${nowPage}, ${pageSize} ")
    List<SubscribeModel> findListBySqlJoin(Map<String, Object> params);

    @Select("SELECT count(1) FROM biz_subscribe t LEFT JOIN biz_user b on t.user_id=b.id WHERE 1=1 ${whereSql}")
    long countBySqlJoin(Map<String, Object> params);

}
